using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Cartoon
{
    public partial class SettingForm : Form
    {
        public SettingForm()
        {
            InitializeComponent();
        }

        private void SetSaveBtn_Click(object sender, EventArgs e)
        {
            if (m_FolderBrowserDialog.ShowDialog() != DialogResult.OK)
                return;

            m_SaveTextBox.Text = m_FolderBrowserDialog.SelectedPath;
        }

        private void SettingForm_Load(object sender, EventArgs e)
        {
            m_SaveTextBox.Text = Config.Instance.SaveDirectory;
        }

        private void OK_Click(object sender, EventArgs e)
        {
            Config.Instance.SaveDirectory = m_SaveTextBox.Text;
            Config.Instance.Save();
            this.Close();
        }

        private void m_Cancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}